package com.magicsoft.share.view.my;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageButton;
import android.widget.TextView;

import com.magicsoft.share.R;
import com.magicsoft.share.base.BaseActivity;
import com.magicsoft.share.bean.my.InstructionModel;
import com.magicsoft.share.constant.Url;
import com.magicsoft.share.presenter.my.InstructionPresenter;

import butterknife.BindView;
import butterknife.ButterKnife;

public class InstructionActivity extends BaseActivity<InstructionView, InstructionPresenter> implements InstructionView {

    @BindView(R.id.view_top)
    View viewTop;
    @BindView(R.id.ibtn_left)
    ImageButton ibtnLeft;
    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.ibtn_right)
    ImageButton ibtnRight;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.webview)
    WebView webview;

    public InstructionPresenter initPresenter() {
        return new InstructionPresenter();
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_instruction;
    }

    @Override
    public void initData() {

    }

    @Override
    public void initView() {

        WebSettings webSettings=webview.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webview.loadUrl(Url.BASE_URL+"/api/open/platform/personalCenter");
    }
    @Override
    public void requestData() {
//        mPresenter.instruction();
    }

    @Override
    public void onPointerCaptureChanged(boolean hasCapture) {

    }


    @Override
    public void OnNext(InstructionModel model) {

    }

    @Override
    public void OnError() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
